<template>
  <view class="tool app-tabbar">
    <!-- <image class="tool_blue" src="https://file.lulaile.com/group1/M00/00/7F/rBKjoV1WhCuAbciOAACL-j59g-g221.png" /> -->
    <image class="tool_blue" src='../../../static/img/title.png' />
	<view class="tool_name">违法管理</view>
    <view class="tool_button">
      <view class="tool_button_left" @click="handleJump('createBreakLaw')">
        <image src="/static/tool/law.png" class="tool_button_left_image" />
        <view class="tool_button_left_write">
          <view class="tool_button_left_write_title">创建违法行为</view>
          <view class="tool_button_left_write_subtitle">上传违法证据</view>
        </view>
      </view>
      <view class="tool_button_left arrow" @click="handleJump('createEnforceLaw')">
        <image src="/static/tool/execute.png" class="tool_button_left_image" />
        <view class="tool_button_left_write">
          <view class="tool_button_left_write_title">创建执法信息</view>
          <view class="tool_button_left_write_subtitle">对违法行为过程编号</view>
        </view>
      </view>
    </view>
	<view class="tool_name">河道信息</view>
    <view class="tool_button">
      <view class="tool_button_left" @click="handleJump('createRiver')">
        <image src="/static/tool/create.png" class="tool_button_left_image" />
        <view class="tool_button_left_write">
          <view class="tool_button_left_write_title">创建河道</view>
          <view class="tool_button_left_write_subtitle">创建河道相关信息</view>
        </view>
      </view>
      <view class="tool_button_left arrow" @click="handleJump('riverList')">
        <image src="/static/tool/list.png" class="tool_button_left_image" />
        <view class="tool_button_left_write">
          <view class="tool_button_left_write_title">河道列表</view>
          <view class="tool_button_left_write_subtitle">查询河道信息</view>
        </view>
      </view>
    </view>
    <!-- <view class="tool_button_left down">
      <image src="/static/tool/alter.png" class="tool_button_left_image" />
      <view class="tool_button_left_write">
        <view class="tool_button_left_write_title">修改河道</view>
        <view class="tool_button_left_write_subtitle">修改河道关键信息</view>
      </view>
    </view> -->
    <view class="tool_name">河段信息</view>
    <view class="tool_button" >
      <view class="tool_button_left" @click="handleJump('createReach')">
        <image src="/static/tool/create.png" class="tool_button_left_image" />
        <view class="tool_button_left_write">
          <view class="tool_button_left_write_title">创建河段</view>
          <view class="tool_button_left_write_subtitle">创建河段相关信息</view>
        </view>
      </view>
	  <view class="tool_button_left arrow" @click="handleJump('reachList')">
	    <image src="/static/tool/list.png" class="tool_button_left_image" />
	    <view class="tool_button_left_write">
	      <view class="tool_button_left_write_title">河段列表</view>
	      <view class="tool_button_left_write_subtitle">查询河段信息</view>
	    </view>
	  </view>
    </view>
	<!-- <view class="tool_button_left down">
	  <image src="/static/tool/alter.png" class="tool_button_left_image" />
	  <view class="tool_button_left_write">
	    <view class="tool_button_left_write_title">修改河段</view>
	    <view class="tool_button_left_write_subtitle">修改河段关键信息</view>
	  </view>
	</view> -->
  </view>
</template>

<script>
export default {
  // 工具
  // name: "河道管理",
  methods: {
    handleJump(type) {
		uni.navigateTo({
			// url: "./cpn/create-river"
			url: {
			  createRiver: "./cpn/create-river",
			  createReach: "./cpn/create-reach",
			  createBreakLaw:"./cpn/create-break-law",
			  createEnforceLaw:"./cpn/create-enforce-law",
			  riverList: "./cpn/river-list",
			  reachList: "./cpn/reach-list",
			}[type]					
		})
      // uni.navigateTo({
        // url: {
        //   freeTicket: "/pagesShops/freeTicket/index",
        //   shareRed: (() => {
        //     const res = uni.getStorageSync("operationFlag").shareRed;
        //     return `/pagesShops/shareRed/${res ? "index" : "guide"}`;
        //   })(),
        //   takeNew: (() => {
        //     const res = uni.getStorageSync("operationFlag").takeNew;
        //     return `/pagesShops/takeNew/${res ? "index" : "guide"}`;
        //   })(),
        //   activity: (() => {
        //     const res = uni.getStorageSync("operationFlag").activity;
        //     return `/pagesShops/customer/activity/${res ? "index" : "guide"}`;
        //   })()
        // }[type]
    }
  }
};
</script>

<style lang="scss" scoped>
.tool {
  &_blue {
    width: 100%;
    height: 148upx;
  }

  &_name {
    @include fzc(32upx);
    margin: 49upx 25upx;
    font-weight: bold;

    &.top {
      margin-top: 97upx;
    }
  }

  &_button {
    @include flexLine;

    &_left {
      @include flexLine;
      margin-left: 25upx;

      &_image {
        width: 80upx;
        height: 80upx;
      }

      &.down {
        margin-top: 53upx;
		margin-bottom: 53upx;
      }

      &.arrow {
        margin-left: 51upx;
      }

      &_write {
        margin-left: 20upx;

        &_title {
          @include fzc(32upx);
        }

        &_subtitle {
          margin-top: 20upx;
          @include fzc(24upx, #999);
        }
      }
    }
  }
}
</style>
